require("../../utils/util.js"), require("../../requests/request.js");

Page({
    data: {
        logs: [],
        logshow: !0,
        city: "",
        car: "",
        modelshow: !1
    },
    onLoad: function() {},
    onReady: function() {
        this.city = this.selectComponent("#city"), this.cardetail = this.selectComponent("#cardetail"), 
        this.reduction = this.selectComponent("#reduction"), this.dealer = this.selectComponent("#dealer");
    },
    showReduction: function() {
        this.reduction.showReduction(3101, 2932), this.setData({
            modelshow: !1
        });
    },
    hideReduction: function() {
        this.setData({
            modelshow: !0
        }), console.log(this.data.modelshow);
    },
    showDealer: function() {
        this.dealer.showDealer(2932, 3101), this.setData({
            modelshow: !1
        });
    },
    hideDealer: function() {
        this.setData({
            modelshow: !0
        });
    },
    showcity: function() {
        this.setData({
            logshow: !this.data.logshow
        }), this.city.showCity();
    },
    showcity1: function() {
        this.setData({
            logshow: !this.data.logshow
        });
        var t = {
            id: 504,
            name: "东莞"
        };
        this.city.showCity(t);
    },
    showcardetail: function() {
        this.setData({
            logshow: !this.data.logshow
        });
        var t = {
            serialid: 2593
        };
        this.cardetail.showCar(t);
    },
    onCallBackCity: function(t) {
        console.log(t), this.city.hideCity(), this.setData({
            city: t.detail.name,
            logshow: !this.data.logshow
        });
    },
    onCallBackCarDetail: function(t) {
        console.log(t), this.cardetail.hideCar(), this.setData({
            car: t.detail.carname,
            logshow: !this.data.logshow
        });
    }
});